export default{
    state:{
        // 控制菜单是收起还是展开
        isCollapse:false,
        tabList:[
            {
                path: "/",
                name: "home",
                label: "首页",
                icon: "s-home",
                url: "Home/Home"
            },
            
        ]
    },
    mutations:{
        collapseMenu(state){
            state.isCollapse = !state.isCollapse
            console.log(state.isCollapse);
        },
        //更新面包屑数据
        selectMenu(state,value){
            console.log(value);
           const index= state.tabList.findIndex(item=>item.name===value.name)
           if(index===-1){
            state.tabList.push(value)
           }
        }
    }

}